//拿到生效日第一天45的最低价作为正在生效的零售价
function AMSfindCurrRetail(EFF_DATE, JSON_CSRL_LIST) {
    var csrl45List = [];
    for (var i = 0; i < JSON_CSRL_LIST.length; i++) {
        if (JSON_CSRL_LIST[i].PRICE_TRAIT == 45
            && JSON_CSRL_LIST[i].PRICE_TYPE != 'CS' && JSON_CSRL_LIST[i].PRICE_TYPE != "MD"
            && betweenDay(EFF_DATE, new Date(JSON_CSRL_LIST[i].EXPIRATION_DATE)) >= 0
            && betweenDay(new Date(JSON_CSRL_LIST[i].EFFECTIVE_DATE), EFF_DATE) >= 0
        ) {
            csrl45List.push(JSON_CSRL_LIST[i]);
        }
    }
    if (isNull(csrl45List)){
        return 0;
    }
    var minRetail = csrl45List[0].CUST_BASE_RTL_AMT;
    for (var j = 0; j < csrl45List.length - 1; j++) {
        if (csrl45List[j].CUST_BASE_RTL_AMT < csrl45List[j + 1].CUST_BASE_RTL_AMT) {
            if (csrl45List[j].CUST_BASE_RTL_AMT < minRetail) {
                minRetail = csrl45List[j].CUST_BASE_RTL_AMT;
            }
        } else {
            if (csrl45List[j + 1].CUST_BASE_RTL_AMT < minRetail) {
                minRetail = csrl45List[j + 1].CUST_BASE_RTL_AMT;
            }
        }
    }
    return minRetail;
}
